package com.bifrost.common.base;

import javax.servlet.http.HttpServletResponse;

public enum ResponseCode {
	SUCCESS(HttpServletResponse.SC_OK,"success"),
	ERROR(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"error"),
	NEED_LOGIN(HttpServletResponse.SC_UNAUTHORIZED,"need_login"),
	ILLEGAL_ARGUMENT(HttpServletResponse.SC_BAD_REQUEST,"illegal argument"),
	//该状态码用于请求资源存在冲突 add by wqhe
	DATA_COLLISION(HttpServletResponse.SC_CONFLICT,"data collision");

	private int code;
	private String desc;
	ResponseCode (int code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
